package model

import "gorm.io/gorm"

type Member struct {
	gorm.Model
	UserId      int64  `gorm:"type:int;not null;commit:'用户Id'"`
	MemberOrder string `gorm:"type:varchar(100);not null;commit:'会员订单'"`
	Price       int64  `gorm:"type:int;not null;commit:'价格'"`
	DramId      int64  `gorm:"type:int;not null;commit:'剧集Id'"`
	Status      int64  `gorm:"type:int;default:0;commit:'会员状态: 0-不是会员,1-是会员'"`
	PayType     int64  `gorm:"type:int;default:0;commit:'支付方式: 0-微信,1-支付宝'"`
	MemberType  int64  `gorm:"type:int;default:0;commit:'支付方式: 0-月度,1-季度',2-年度"`
}

func (m *Member) MemberAdd(db *gorm.DB) error {
	err := db.Create(&m).Error
	return err
}
